package common;

import java.rmi.RemoteException;
import java.util.Calendar;

import common.rmi.event.RemoteStatisticsEvent;

public class StatisticsEvent extends Event implements RemoteStatisticsEvent{
	
	private static final long serialVersionUID = 1L;
	
	private double value;
	
	public StatisticsEvent(String type, double value) throws RemoteException {
		super(type);
		this.value=value;
	}
	
	public String toString(){
		return null;
	}

	@Override
	public String stringRep() throws RemoteException {
		Calendar time=Calendar.getInstance();
		time.setTimeInMillis(this.timestamp);
		return this.type+": "+time.getTime().toString()+" - VALUE IS : "+value;
	}

}
